import request from "./request";
//登录
export function login<t>(params: ApiResponse) {
  return request<t>({
    url: 'user/login',
    method: 'post',
    data: params
  })
}
export type ApiResponse = {
  userName: string;
  password: string;
  remember: boolean;
}
//user/logout 退出登录
export const logout = () => {
  return request({
    url: 'user/logout',
    method: 'post'
  })
}
//获取用户信息
export function dashboardindex<T>() {
  return request<T>({
    url: 'admin/dashboard/index',
    method: 'post'
  })
}
//学生列表/admin/user/page/list
export function studentList<T>(data: studentListype) {
  return request<T>({
    url: '/admin/user/page/list',
    method: 'post',
    data,
  })
}
export type studentListype = {
  "userName": string,  //用户名
  "role": number,   //角色
  "pageIndex": number,  //页码
  "pageSize": number   //每页条数
}
